package @actionPackage@.util;

import java.util.AbstractList;
import java.util.List;

public class PagedList<E> extends AbstractList<E> {

	private final List<E> list;
	private final int total;
	private final int pageLimit;

	public PagedList(List<E> l, int total, int pageLimit) {
		this.list = l;
		this.total = total;
		this.pageLimit = pageLimit;
	}

	public int size() {
		return total;
	}

	public E get(int i) {
		i = i % this.pageLimit;
		return list.get(i);
	}
}
